// 装饰画状态枚举
export const DecorationStatus = {
  CREATING: 0,    // 生成中
  COMPLETED: 1,   // 已完成
  FAILED: 2,      // 生成失败
  DELETED: 3      // 已删除
}

// 风格模板类型
export const StyleType = {
  OIL_PAINTING: 1,    // 油画
  WOOL_KNITTING: 6,   // 羊毛编织
  GARDEN: 3,          // 花园风格
  CARTOON: 5          // 手绘插画
}

// 房间类型
export const RoomType = {
  CREAM_DINING: 1,    // 奶油风餐厅
  CREAM_BEDROOM: 2,   // 奶油风卧室
  VINTAGE_LIVING: 3,  // 中古风客厅
  VINTAGE_DINING: 4   // 中古风餐厅
}

/**
 * API响应码
 */
export const ApiResponseCode = {
  SUCCESS: 200,
  BAD_REQUEST: 400,
  UNAUTHORIZED: 401,
  FORBIDDEN: 403,
  NOT_FOUND: 404,
  SERVER_ERROR: 500
}

// 分页默认值
export const PaginationDefaults = {
  PAGE_SIZE: 10,
  CURRENT_PAGE: 1
}

// 积分操作类型
export const PointOperationType = {
  CREATE_DECORATION: 1,    // 创建装饰画
  SHARE_DECORATION: 2,     // 分享装饰画
  DAILY_LOGIN: 3,         // 每日登录
  INVITE_USER: 4          // 邀请用户
}

// 系统配置键
export const ConfigKeys = {
  POINTS_FOR_CREATE: 'points_for_create',
  POINTS_FOR_SHARE: 'points_for_share',
  POINTS_FOR_LOGIN: 'points_for_login',
  POINTS_FOR_INVITE: 'points_for_invite',
  MAX_DAILY_GENERATIONS: 'max_daily_generations'
}

// 文件上传配置
export const UploadConfig = {
  MAX_SIZE: 5 * 1024 * 1024,  // 5MB
  ALLOWED_TYPES: ['image/jpeg', 'image/png', 'image/webp'],
  UPLOAD_URL: '/api/upload'
}

/**
 * 本地存储键
 */
export const StorageKeys = {
  USER_INFO: 'user_info',
  TOKEN: 'token',
  SELECTED_STYLE: 'selected_style',
  SELECTED_ROOM: 'selected_room',
  SELECTED_KEYWORDS: 'selected_keywords',
  REFRESH_TOKEN: 'refreshToken'
}

/**
 * 错误消息
 */
export const ErrorMessages = {
  NETWORK_ERROR: '网络错误，请检查网络连接',
  SERVER_ERROR: '服务器错误，请稍后再试',
  UNAUTHORIZED: '登录已过期，请重新登录',
  FORBIDDEN: '没有权限进行此操作',
  NOT_FOUND: '资源不存在',
  BAD_REQUEST: '请求参数错误',
  CREATE_FAILED: '创建失败',
  UPDATE_FAILED: '更新失败',
  DELETE_FAILED: '删除失败',
  UPLOAD_FAILED: '上传失败'
}

/**
 * API基础URL
 */
export const ApiBaseURL = {
  DEVELOPMENT: 'http://localhost:51601',
  PRODUCTION: 'https://api.example.com'
}

/**
 * 摄像头相关常量
 */
export const CameraConstants = {
  DEFAULT_QUALITY: 0.8,
  DEFAULT_COMPRESSION_RATIO: 0.7,
  MAX_SIZE: 10 * 1024 * 1024, // 10MB
  ALLOWED_EXTENSIONS: ['.jpg', '.jpeg', '.png'],
  CAMERA_ERROR_MESSAGE: '摄像头访问失败，请检查权限设置'
}

/**
 * 文件上传相关常量
 */
export const UploadConstants = {
  IMAGE_MIME_TYPES: ['image/jpeg', 'image/png', 'image/jpg'],
  MAX_IMAGE_SIZE: 5 * 1024 * 1024, // 5MB
  DEFAULT_IMAGE_QUALITY: 0.8,
  UPLOAD_TIMEOUT: 30000, // 30秒
  IMAGE_COMPRESS_THRESHOLD: 1 * 1024 * 1024 // 1MB
}

export default {
  ApiResponseCode,
  ErrorMessages,
  StorageKeys,
  ApiBaseURL,
  CameraConstants,
  UploadConstants
} 